<template>
    <div>
        这是child页面
        <h1>父组件传入{{ num }}</h1>
        <button @click="changePN('11')">子组件+</button>
    </div>
</template>
<script lang="ts">
import { defineComponent} from 'vue'
export default defineComponent({
    props: {
     num: Number
    },
    setup(props, res) {
        const changePN = () => {
            res.emit('handle',2)
        }
        return {
        changePN
        }
    }
    })
</script>